3.13 \(\int \frac{(a+b \tanh ^{-1}(c x))^2}{(d+e x)^2} \, dx\)

Optimal. Leaf size=321 \[ -\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2}{c x+1}\right )}{c^2 d^2-e^2}+\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{c^2 d^2-e^2}+\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2}{1-c x}\right )}{2 e (c d+e)}+\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2}{c x+1}\right )}{2 e (c d-e)}+\frac{2 b c \log \left (\frac{2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^2 d^2-e^2}-\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{c^2 d^2-e^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{b c \log \left (\frac{2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e (c d+e)}-\frac{b c \log \left (\frac{2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e (c d-e)} \]

[Out]

-((a + b*ArcTanh[c*x])^2/(e*(d + e*x))) + (b*c*(a + b*ArcTanh[c*x])*Log[2/(1 - c*x)])/(e*(c*d + e)) - (b*c*(a
+ b*ArcTanh[c*x])*Log[2/(1 + c*x)])/((c*d - e)*e) + (2*b*c*(a + b*ArcTanh[c*x])*Log[2/(1 + c*x)])/(c^2*d^2 - e
^2) - (2*b*c*(a + b*ArcTanh[c*x])*Log[(2*c*(d + e*x))/((c*d + e)*(1 + c*x))])/(c^2*d^2 - e^2) + (b^2*c*PolyLog
[2, 1 - 2/(1 - c*x)])/(2*e*(c*d + e)) + (b^2*c*PolyLog[2, 1 - 2/(1 + c*x)])/(2*(c*d - e)*e) - (b^2*c*PolyLog[2
, 1 - 2/(1 + c*x)])/(c^2*d^2 - e^2) + (b^2*c*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + e)*(1 + c*x))])/(c^2*d^2 -
 e^2)

________________________________________________________________________________________

Rubi [A]  time = 0.312857, antiderivative size = 321, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5928, 5918, 2402, 2315, 5920, 2447} \[ -\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2}{c x+1}\right )}{c^2 d^2-e^2}+\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{c^2 d^2-e^2}+\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2}{1-c x}\right )}{2 e (c d+e)}+\frac{b^2 c \text{PolyLog}\left (2,1-\frac{2}{c x+1}\right )}{2 e (c d-e)}+\frac{2 b c \log \left (\frac{2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^2 d^2-e^2}-\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{c^2 d^2-e^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{b c \log \left (\frac{2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e (c d+e)}-\frac{b c \log \left (\frac{2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e (c d-e)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])^2/(d + e*x)^2,x]

[Out]

-((a + b*ArcTanh[c*x])^2/(e*(d + e*x))) + (b*c*(a + b*ArcTanh[c*x])*Log[2/(1 - c*x)])/(e*(c*d + e)) - (b*c*(a
+ b*ArcTanh[c*x])*Log[2/(1 + c*x)])/((c*d - e)*e) + (2*b*c*(a + b*ArcTanh[c*x])*Log[2/(1 + c*x)])/(c^2*d^2 - e
^2) - (2*b*c*(a + b*ArcTanh[c*x])*Log[(2*c*(d + e*x))/((c*d + e)*(1 + c*x))])/(c^2*d^2 - e^2) + (b^2*c*PolyLog
[2, 1 - 2/(1 - c*x)])/(2*e*(c*d + e)) + (b^2*c*PolyLog[2, 1 - 2/(1 + c*x)])/(2*(c*d - e)*e) - (b^2*c*PolyLog[2
, 1 - 2/(1 + c*x)])/(c^2*d^2 - e^2) + (b^2*c*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + e)*(1 + c*x))])/(c^2*d^2 -
 e^2)

Rule 5928

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(
a + b*ArcTanh[c*x])^p)/(e*(q + 1)), x] - Dist[(b*c*p)/(e*(q + 1)), Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p
 - 1), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] &
& NeQ[q, -1]

Rule 5918

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])^p*
Log[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTanh[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 - c^2
*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 5920

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])*Log[2/(1
 + c*x)])/e, x] + (Dist[(b*c)/e, Int[Log[2/(1 + c*x)]/(1 - c^2*x^2), x], x] - Dist[(b*c)/e, Int[Log[(2*c*(d +
e*x))/((c*d + e)*(1 + c*x))]/(1 - c^2*x^2), x], x] + Simp[((a + b*ArcTanh[c*x])*Log[(2*c*(d + e*x))/((c*d + e)
*(1 + c*x))])/e, x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 - e^2, 0]

Rule 2447

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[(Pq^m*(1 - u))/D[u, x]]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rubi steps

\begin{align*} \int \frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{(d+e x)^2} \, dx &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{(2 b c) \int \left (-\frac{c \left (a+b \tanh ^{-1}(c x)\right )}{2 (c d+e) (-1+c x)}+\frac{c \left (a+b \tanh ^{-1}(c x)\right )}{2 (c d-e) (1+c x)}+\frac{e^2 \left (a+b \tanh ^{-1}(c x)\right )}{(-c d+e) (c d+e) (d+e x)}\right ) \, dx}{e}\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{\left (b c^2\right ) \int \frac{a+b \tanh ^{-1}(c x)}{1+c x} \, dx}{(c d-e) e}-\frac{\left (b c^2\right ) \int \frac{a+b \tanh ^{-1}(c x)}{-1+c x} \, dx}{e (c d+e)}+\frac{(2 b c e) \int \frac{a+b \tanh ^{-1}(c x)}{d+e x} \, dx}{(-c d+e) (c d+e)}\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{e (c d+e)}-\frac{b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{(c d-e) e}+\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{(c d-e) (c d+e)}-\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{(c d-e) (c d+e)}+\frac{\left (b^2 c^2\right ) \int \frac{\log \left (\frac{2}{1+c x}\right )}{1-c^2 x^2} \, dx}{(c d-e) e}-\frac{\left (b^2 c^2\right ) \int \frac{\log \left (\frac{2}{1-c x}\right )}{1-c^2 x^2} \, dx}{e (c d+e)}+\frac{\left (2 b^2 c^2\right ) \int \frac{\log \left (\frac{2}{1+c x}\right )}{1-c^2 x^2} \, dx}{(-c d+e) (c d+e)}-\frac{\left (2 b^2 c^2\right ) \int \frac{\log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{1-c^2 x^2} \, dx}{(-c d+e) (c d+e)}\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{e (c d+e)}-\frac{b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{(c d-e) e}+\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{(c d-e) (c d+e)}-\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{(c d-e) (c d+e)}+\frac{b^2 c \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{(c d-e) (c d+e)}+\frac{\left (b^2 c\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+c x}\right )}{(c d-e) e}+\frac{\left (b^2 c\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-c x}\right )}{e (c d+e)}+\frac{\left (2 b^2 c\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+c x}\right )}{(-c d+e) (c d+e)}\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{e (d+e x)}+\frac{b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{e (c d+e)}-\frac{b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{(c d-e) e}+\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{(c d-e) (c d+e)}-\frac{2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{(c d-e) (c d+e)}+\frac{b^2 c \text{Li}_2\left (1-\frac{2}{1-c x}\right )}{2 e (c d+e)}+\frac{b^2 c \text{Li}_2\left (1-\frac{2}{1+c x}\right )}{2 (c d-e) e}-\frac{b^2 c \text{Li}_2\left (1-\frac{2}{1+c x}\right )}{(c d-e) (c d+e)}+\frac{b^2 c \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{(c d-e) (c d+e)}\\ \end{align*}

Mathematica [C]  time = 4.38318, size = 317, normalized size = 0.99 \[ \frac{b^2 \left (\frac{c d \left (\text{PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-i \pi \left (\tanh ^{-1}(c x)-\frac{1}{2} \log \left (1-c^2 x^2\right )\right )-2 \tanh ^{-1}(c x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-2 \tanh ^{-1}\left (\frac{c d}{e}\right ) \left (\log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-\log \left (i \sinh \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )+\tanh ^{-1}(c x)\right )+i \pi \log \left (e^{2 \tanh ^{-1}(c x)}+1\right )\right )}{c^2 d^2-e^2}-\frac{\tanh ^{-1}(c x)^2 e^{-\tanh ^{-1}\left (\frac{c d}{e}\right )}}{e \sqrt{1-\frac{c^2 d^2}{e^2}}}+\frac{x \tanh ^{-1}(c x)^2}{d+e x}\right )}{d}-\frac{a^2}{e (d+e x)}+\frac{a b c \left (\frac{(e-c d) \log (1-c x)+(c d+e) \log (c x+1)-2 e \log (c (d+e x))}{(c d-e) (c d+e)}-\frac{2 \tanh ^{-1}(c x)}{c d+c e x}\right )}{e} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTanh[c*x])^2/(d + e*x)^2,x]

[Out]

-(a^2/(e*(d + e*x))) + (a*b*c*((-2*ArcTanh[c*x])/(c*d + c*e*x) + ((-(c*d) + e)*Log[1 - c*x] + (c*d + e)*Log[1
+ c*x] - 2*e*Log[c*(d + e*x)])/((c*d - e)*(c*d + e))))/e + (b^2*(-(ArcTanh[c*x]^2/(Sqrt[1 - (c^2*d^2)/e^2]*e*E
^ArcTanh[(c*d)/e])) + (x*ArcTanh[c*x]^2)/(d + e*x) + (c*d*(I*Pi*Log[1 + E^(2*ArcTanh[c*x])] - 2*ArcTanh[c*x]*L
og[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))] - I*Pi*(ArcTanh[c*x] - Log[1 - c^2*x^2]/2) - 2*ArcTanh[(c*d)/
e]*(ArcTanh[c*x] + Log[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))] - Log[I*Sinh[ArcTanh[(c*d)/e] + ArcTanh[c
*x]]]) + PolyLog[2, E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))]))/(c^2*d^2 - e^2)))/d

________________________________________________________________________________________

Maple [A]  time = 0.117, size = 605, normalized size = 1.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))^2/(e*x+d)^2,x)

[Out]

-c*a^2/(c*e*x+c*d)/e-c*b^2/(c*e*x+c*d)/e*arctanh(c*x)^2-2*c*b^2*arctanh(c*x)/(c*d+e)/(c*d-e)*ln(c*e*x+c*d)-2*c
*b^2/e*arctanh(c*x)/(2*c*d+2*e)*ln(c*x-1)+2*c*b^2/e*arctanh(c*x)/(2*c*d-2*e)*ln(c*x+1)+c*b^2/(c*d+e)/(c*d-e)*l
n((c*e*x+e)/(-c*d+e))*ln(c*e*x+c*d)+c*b^2/(c*d+e)/(c*d-e)*dilog((c*e*x+e)/(-c*d+e))-c*b^2/(c*d+e)/(c*d-e)*ln((
c*e*x-e)/(-c*d-e))*ln(c*e*x+c*d)-c*b^2/(c*d+e)/(c*d-e)*dilog((c*e*x-e)/(-c*d-e))-1/2*c*b^2/e/(c*d-e)*ln(-1/2*c
*x+1/2)*ln(1/2+1/2*c*x)+1/2*c*b^2/e/(c*d-e)*ln(-1/2*c*x+1/2)*ln(c*x+1)-1/2*c*b^2/e/(c*d-e)*dilog(1/2+1/2*c*x)-
1/4*c*b^2/e/(c*d-e)*ln(c*x+1)^2+1/2*c*b^2/e/(c*d+e)*dilog(1/2+1/2*c*x)+1/2*c*b^2/e/(c*d+e)*ln(c*x-1)*ln(1/2+1/
2*c*x)-1/4*c*b^2/e/(c*d+e)*ln(c*x-1)^2-2*c*b*a/(c*e*x+c*d)/e*arctanh(c*x)-2*c*b*a/(c*d+e)/(c*d-e)*ln(c*e*x+c*d
)-2*c*b*a/e/(2*c*d+2*e)*ln(c*x-1)+2*c*b*a/e/(2*c*d-2*e)*ln(c*x+1)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\left (c{\left (\frac{\log \left (c x + 1\right )}{c d e - e^{2}} - \frac{\log \left (c x - 1\right )}{c d e + e^{2}} - \frac{2 \, \log \left (e x + d\right )}{c^{2} d^{2} - e^{2}}\right )} - \frac{2 \, \operatorname{artanh}\left (c x\right )}{e^{2} x + d e}\right )} a b - \frac{1}{4} \, b^{2}{\left (\frac{\log \left (-c x + 1\right )^{2}}{e^{2} x + d e} + \int -\frac{{\left (c e x - e\right )} \log \left (c x + 1\right )^{2} + 2 \,{\left (c e x + c d -{\left (c e x - e\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{c e^{3} x^{3} - d^{2} e +{\left (2 \, c d e^{2} - e^{3}\right )} x^{2} +{\left (c d^{2} e - 2 \, d e^{2}\right )} x}\,{d x}\right )} - \frac{a^{2}}{e^{2} x + d e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(e*x+d)^2,x, algorithm="maxima")

[Out]

(c*(log(c*x + 1)/(c*d*e - e^2) - log(c*x - 1)/(c*d*e + e^2) - 2*log(e*x + d)/(c^2*d^2 - e^2)) - 2*arctanh(c*x)
/(e^2*x + d*e))*a*b - 1/4*b^2*(log(-c*x + 1)^2/(e^2*x + d*e) + integrate(-((c*e*x - e)*log(c*x + 1)^2 + 2*(c*e
*x + c*d - (c*e*x - e)*log(c*x + 1))*log(-c*x + 1))/(c*e^3*x^3 - d^2*e + (2*c*d*e^2 - e^3)*x^2 + (c*d^2*e - 2*
d*e^2)*x), x)) - a^2/(e^2*x + d*e)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \operatorname{artanh}\left (c x\right )^{2} + 2 \, a b \operatorname{artanh}\left (c x\right ) + a^{2}}{e^{2} x^{2} + 2 \, d e x + d^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(e*x+d)^2,x, algorithm="fricas")

[Out]

integral((b^2*arctanh(c*x)^2 + 2*a*b*arctanh(c*x) + a^2)/(e^2*x^2 + 2*d*e*x + d^2), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \operatorname{atanh}{\left (c x \right )}\right )^{2}}{\left (d + e x\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))**2/(e*x+d)**2,x)

[Out]

Integral((a + b*atanh(c*x))**2/(d + e*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \operatorname{artanh}\left (c x\right ) + a\right )}^{2}}{{\left (e x + d\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(e*x+d)^2,x, algorithm="giac")

[Out]

integrate((b*arctanh(c*x) + a)^2/(e*x + d)^2, x)